package com.ts.api.module.channel.dao;

import com.ts.api.module.channel.entity.po.ChannelUserFormFieldPO;
import com.ts.api.module.channel.entity.po.ChannelUserFormPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 渠道表单字段
 */
@Mapper
public interface ChannelHistoryFormDao {

    /**
     * 根据渠道获取用户填写表单
     *
     * @param  loanUserId  用户id
     * @return List
     */
    List<ChannelUserFormFieldPO> listUserFormField(@Param("loanUserId") Long loanUserId);

    /**
     * 插入用户表单
     *
     * @param  channelUserFormPO
     * @return int
     */
    int batchInsertUserForm(List<ChannelUserFormPO> channelUserFormPO);

    /**
     * 删除某用户所有表单
     *
     * @param  userId   用户主键id
     * @return int
     */
    int removeByUserId(@Param("userId") Long userId);

}
